import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class C_1004 {
    public static void main(String[] args) {
        int num = 1;
        List<module> list = new ArrayList<>();
        list.add(new module(99,true));
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()){
            int i = sc.nextInt();
            for (;i>0;i--){
                for(int j = 0;j<list.size()-1;i++){
                    module e = list.get(j);
                    e.age++;
                    if (e.age>=4){
                        e.mod = true;
                    }
                    if (e.mod){
                        list.add(new module(0,false));
                    }
                }
            }
        }
    }
}
class module{
    int age;

    public module(int age,boolean mod) {
        this.age = age;
        this.mod = mod;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public boolean isMod() {
        return mod;
    }

    public void setMod(boolean mod) {
        this.mod = mod;
    }

    int year;
    boolean mod;
}
